// 分类列表
var classifyList=[
	{	
		title:"教程知识",
		// 右侧内容
		// 右侧上方背景
		bg:"../img/classification/classification_photo_banner.png",
		// 右侧下方内容
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"艺术摄影",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"风光景色",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"创意合成",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"时尚潮流",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"街头约拍",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	},
	{
		title:"VLOG",
		bg:"../img/classification/classification_photo_banner.png",
		contents:[
			{
				img:"../img/classification/classification_img.png",
				name:"相机"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"构图"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"光线"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"后期"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"书籍"
			},
			{
				img:"../img/classification/classification_img.png",
				name:"审美"
			}
		]
	}
]
$(".returnBox").on("click",function(){
	window.history.go(-1)
})
// 当前左侧导航下标
var nowClassifyIndex=0
// 左侧导航
function getClassify(){
	for(var i=0;i<classifyList.length;i++){
		$(".classifyTitleUl").append('<li data-index='+i+'>'+classifyList[i].title+'</li>')
	}
	$(".classifyTitleUl li").removeClass('activeLi')
	$(".classifyTitleUl li:eq("+nowClassifyIndex+")").addClass('activeLi')
}
// 左侧导航点击事件
$(".classifyTitleUl").on("click","li",function(){
	$(".classifyTitleUl li").removeClass('activeLi')
	$(this).addClass('activeLi')
	nowClassifyIndex=$(this).data("index")
	getRightContent()
})
// 右侧内容
function getRightContent(){
	$(".classifyContent .rightBox .bg").empty()
	$(".contentUl").empty()
	var classify=classifyList[nowClassifyIndex]
	// 右侧上方背景
	$(".classifyContent .rightBox .bg").append('<img src='+classify.bg+' class="bg" />')
	// 右侧下方内容
	for(var i=0;i<classify.contents.length;i++){
		$(".contentUl").append('<li><img src='+classify.contents[i].img+' class="classifyImg" /><p class="imgName">'+classify.contents[i].name+'</p></li>')
	}
}

var all={
	getClassify,
	getRightContent
}
all.getClassify()
all.getRightContent()